package 分支;
import java.util.Scanner;
public class 会员中奖 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入会员号（四位数）：");
        int lottery_draw = input.nextInt();
        int s = 0;
        for (int i = 1; i < 5; i++) {
            s = lottery_draw % 10 + s;
            lottery_draw = lottery_draw / 10;
        }
        System.out.println("每位数的和为" + s);
        if (s > 24) {
            System.out.println("恭喜您，您中奖了，奖品是彩电一台");
        } else if (s > 20) {
            System.out.println("恭喜您，您中奖了，奖品是吹风机一部");
        }else if (s > 16) {
            System.out.println("恭喜您，您中奖了，奖品是餐巾纸一包");
        }else{
            System.out.println("下次继续努力");
        }
    }
}
